package com.example.myuser.feign;

import com.example.myorder.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "my-order",path = "/order")
public interface OrderFeignService {

    @RequestMapping("/getOrderById")
    public Order getOrderById(Integer id);

    @RequestMapping("/getOrderListByUserId")
    public List<Order> getOrderListByUserId(@RequestParam("userId") Integer userId);

}
